<?php
/**
 * CakePOWER
 * Cache Object Configuration
 * 
 * @author:			Marco Pegoraro
 * @mail:			marco(dot)pegoraro(at)gmail(dot)com
 * 
 * 22 September 2009
 * Core configuration rules for the Cache object.
 * 
 * CakePOWER uses Cache (a CakepHP Object) to cache informations. This files contain
 * rules to set the behavior of caching.
 * 
 * This file is loaded after "/app/config/cache.php" who can pre-define all these informations
 * overriding this built-in configuration.
 */


/**
 * Cache status.
 * This settings globally regulate the behavior of system for caching objects.
 * Every cache mechanism can be disabled by setting to "false" this key. 
 */
DAC::def('power.cache.enabled', true );



/**
 * Cache Profiles
 * Set some profiles of caching to be used sincronized with debug level of application.
 * These profiles can be oversetted into App's cache configuration file.
 */

DAC::def('power.cache.debug0',array(
	'prefix'		=> 'pow_dbg0_',
	'duration'		=> '48 hours',
	'engine'		=> 'File'
));
Cache::config( 'debug0', DAC::read('power.cache.debug0') );

DAC::def('power.cache.debug1',array(
	'prefix'		=> 'pow_dbg1_',
	'duration'		=> '1 minute',
	'engine'		=> 'File'
));
Cache::config( 'debug1', DAC::read('power.cache.debug1') );

DAC::def('power.cache.debug2',array(
	'prefix'		=> 'pow_dbg2_',
	'duration'		=> '-1',
	'engine'		=> 'File'
));
Cache::config( 'debug2', DAC::read('power.cache.debug2') );

DAC::def('power.cache.debug3',array(
	'prefix'		=> 'pow_dbg3_',
	'duration'		=> '-1',
	'engine'		=> 'File'
));
Cache::config( 'debug3', DAC::read('power.cache.debug3') );





/**
 * Cache Auto Profile
 * This is an auto-valued configuration setting to reflect the debug level into cache management.
 * Use this constant when calling che "Cache" object to tell CakePHP how to use Cache itself.
 */
if ( !defined('pwCACHE') )			define( 'pwCACHE', 				'debug'.Configure::read('debug') );


?>